<?php
/** 命名空间 */
namespace app\cp_card;

function makeid($total)
{
	$v1 = array ('5','h','d','l','a','z','n','r','t','p','y','c','x','1','3','m','0','e','7','6','v','k','b','i','8','9','s','o','2','w','q','4','g','j','u','f');
	$v2 = array ('z','w','2','o','6','a','7','u','g','p','t','i','x','d','c','k','h','e','f','n','4','0','b','1','l','m','v','5','3','8','q','j','r','s','y','9');
	$v3 = array ('r','l','c','y','2','g','9','0','o','s','j','m','6','i','p','t','a','k','3','u','h','z','8','e','d','b','n','7','v','5','w','f','4','x','1','q');
	$v4 = array ('z','s','r','t','u','q','c','h','6','i','b','4','0','d','l','w','o','1','j','3','y','x','2','k','5','7','a','p','g','m','8','n','f','v','9','e');
	$v5 = array ('e','z','d','m','2','i','o','r','8','n','v','p','1','q','x','y','0','j','9','6','s','t','a','f','g','c','w','3','u','h','l','b','7','4','k','5');
	$v6 = array ('x','5','f','y','q','r','v','z','o','t','0','6','p','s','a','7','k','8','1','g','b','d','m','i','c','2','3','j','4','e','h','n','l','u','9','w');
	
	$step		= floor(2176782336/$total);
	$start_id 	= time() % 2176782336;
	$rs       	= array();
	for ($i=0;$i<$total;$i++)
	{
		$id			= $id+$step;
		if($id > 2176782336)
		{
			$id		= $id % 2176782336;
		}
		$m1 		= $id % 36;
		$d1 		= floor($id/36);
		$m2 		= $d1 % 36;
		$d2 		= floor($d1/36);
		$m3 		= $d2 % 36;
		$d3 		= floor($d2/36);
		$m4 		= $d3 % 36;
		$d4 		= floor($d3/36);
		$m5 		= $d4 % 36;
		$d5 		= floor($d4/36);
		$m6 		= $d5 % 36;
		//
		$cardid		= $v6[$m6].$v5[$m5].$v4[$m4].$v3[$m3].$v2[$m2].$v1[$m1];
		$cardid		= strtoupper($cardid);
		array_push($rs,$cardid);
	}
	return $rs;
}
function makeid_n()
{
	return '007YES';
}